<%--
  Created by IntelliJ IDEA.
  User: Lee
  Date: 2022/4/9
  Time: 16:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<html>
<head>
    <title>Title</title>
    <script>
        //注销
        function logout(){
            //发送请求给注销的servlet
            location.href="logout";
        }
    </script>
</head>
<body>
<img style="width: 200px; height: 200px;" src="headershow"/>
<h1>学生管理系统首页！欢迎${login_user.name}登录</h1>
<button onclick="logout();">退出登录</button>
<hr/>
<div style="margin-top: 20px">

    <c:if test="${fn:contains(login_user.powers, '1') }">
        <button onclick="javascript:location.href='querystudent'">学生列表</button>
    </c:if>

    <br/>
    <br/>
    <c:if test="${fn:contains(login_user.powers, '2') }">
        <button onclick="javascrpit:location.href='addstudent.jsp'">新增学生</button>
    </c:if>
</div>
</body>
</body>
</html>
